function webstartVersionCheck(versionString) {
	if (!(navigator.mimeTypes && navigator.mimeTypes.length))return false;
	// Mozilla may not recognize new plugins without this refresh
	navigator.plugins.refresh(false);
	// First, determine if Web Start is available
	if (navigator.mimeTypes['application/x-java-jnlp-file']) {
		// Next, check for appropriate version family
		for (var i = 0; i < navigator.mimeTypes.length; ++i) {
			pluginType = navigator.mimeTypes[i].type;
			if(pluginType.indexOf("application/x-java-applet;version=")==0)
			{
				if (pluginType == "application/x-java-applet;version=" + versionString) {
					return true;
				}
			}
		}
	}
	return false;
}

if(typeof(javawsInstalled)=='undefined')javawsInstalled=false;
if(typeof(javaws150Installed)=='undefined')javaws150Installed=false;
if(typeof(javaws160Installed)=='undefined')javaws160Installed=false;

function DetectJWS() {
	if (Prototype.Browser.IE && (javaws160Installed)) {
		return true;
	}
	if (typeof(navigator.mimeTypes)!='undefined' && typeof(navigator.mimeTypes.length)!='undefined')
	{
		if (webstartVersionCheck("1.6")) {
			return true;
		}
		return false;
	}
	if(Prototype.Browser.Gecko)
		return true;
	return false;
}


if(!javawsInstalled)
	javawsInstalled = DetectJWS();
